<?php
/**
 * Created by PhpStorm.
 * User: Da Xiong
 * Date: 2018/12/10
 * Time: 14:45
 */

namespace App\Http\Controllers\v3;


use App\Models\Config;

class ConfigController extends Controller
{

    // 获取配置项
    public function index(){
        $name = (string)request()->get('name','');
        if(!$name){
            return $this->returnJson(1,'error');
        }
        $url = Config::where('name',$name)->value('value');
        return $this->returnJson(0,'',$url);
    }
}
